#ifndef POWERSTATIONPOOL_H
#define POWERSTATIONPOOL_H
#include <QThreadPool>
#include <QMutex>
#include <QtWidgets>
#include <QRunnable>
#include "tools/Reader.h"
#include "solar/beacon/Field.h"
#include "order/AnalyDataLoaded.h"
#include "order/AnalyExcelCompare.h"
#include "order/MultidatasAddtion.h"
#include "order/MultidatasAmend.h"
#include "order/MultidressMaker.h"

class DialPool : public QThreadPool{

    Q_OBJECT

public:

    DialPool(QMap<ThreadPoint, NT::THREAD_STATE> &quote_thread,
             QMap<QString, QMap<QString, QString>> &quote_rlmap,
             QMap<QString, QString> &quote_strmap,
             QMap<QString, bool> &quote_swtcmap,
             QMap<QString, qint64> &quote_intmap,
             QMap<QString, QList<QString>> &quote_ststrmap,
             QMap<QString, QList<qint64>> &quote_stintmap,
             QMap<QString, QList<QList<QString>>> &quote_stspcharmap,
             QSqlDatabase *db);

    DialPool(QMap<ThreadPoint, NT::THREAD_STATE> &quote_thread,
             QMap<QString, QMap<QString, QString>> &quote_rlmap,
             QMap<QString, QString> &quote_strmap,
             QMap<QString, bool> &quote_swtcmap,
             QMap<QString, qint64> &quote_intmap,
             QMap<QString, QList<QString>> &RdoMapListStr,
             QMap<QString, QList<qint64>> &quote_stintmap,
             QMap<QString, NT::CUT_MEDIA_TYPE> &quote_mtpltype,
             QSqlDatabase *db);

    ~DialPool();

    void run(ThreadPoint obj);

    StickTData *data_paste;

    ExcelCompare *data_compare;

    MultidatasAddtion *mdrs_data_addtion;

    MultidatasAmend *mdrs_data_amend;

    MultidressMaker *mdrs_head_crop;

    MultidatasTake *mdrs_data_del;

private:
    QMap<ThreadPoint, QRunnable*> dial_object;
    QMap<ThreadPoint, bool> dial_state;

};

#endif
